﻿using MvcExtensions;

namespace BlankMvc.Types {
	public class UserLoginMeta : ModelMetadataConfiguration<UserLogin> {
		public UserLoginMeta() {
			Configure(x => x.RememberMe).DisplayName("Запомнить");
			Configure(x => x.UserName).Required().MaximumLength(20).MinimumLength(4).DisplayName("Логин");
			Configure(x => x.Password).Required().MaximumLength(20).AsPassword().DisplayName("Пароль");
		}
	}

	public class UserLogin {
		public bool RememberMe { get; set; }
		public string UserName { get; set; }
		public string Password { get; set; }
	}
}
